﻿<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="WUCArt.ascx.cs" Inherits="WebAppArtreve.views.shared.components.arts.WUCArt" %>  
<%@ Register src="WUCArtImage.ascx" tagname="WUCArtImage" tagprefix="artreve" %>
<%@ Register src="WUCLikeUser.ascx" tagname="WUCLikeUser" tagprefix="artreve" %>
<%@ Register src="../ratings/WUCRating.ascx" tagname="WUCRating" tagprefix="artreve" %>
<%@ Register src="WUCBuyArt.ascx" tagname="WUCBuyArt" tagprefix="artreve" %>
<%@ Register src="WUCArtImages.ascx" tagname="WUCArtImages" tagprefix="artreve" %>

<asp:ListView ID="ListViewArt" runat="server" DataSourceID="ODSArtsALL">
    <LayoutTemplate>
        <article id="itemPlaceholder" runat="server" />
    </LayoutTemplate>
    <ItemTemplate>
        <h2><%# Eval("Name") %></h2>
        <artreve:WUCLikeUser ID="WUCLikeUser" ArtId='<%# Eval("Id") %>' runat="server" />
        <artreve:WUCBuyArt ArtId='<%# Eval("Id") %>' ID="WUCBuyArt" runat="server" />
        <article class="artView">
            <section class="art-image">        
                <div>
                    <span class="spanPrice">$<%# Eval("Price")%></span>
                    <img alt="ribbon price" class="ribbon" src="../../../../styles/assets/images/ribbon.png" />
                    <artreve:WUCArtImages ID="WUCArtImages1" runat="server" />
                </div>
            </section>
            <header>
                <h3><span class="spanCategoryName"><%# Eval("CategoryName")%></span> : <%# Eval("Name") %></h3>
                <p class="divRating"><span class="spanCategoryName">Artist: </span><%# Eval("UserNickname")%></p>                    
                <artreve:WUCRating ID="WUCRating1" runat="server" ArtId='<%# Eval("Id")%>' />
            </header> 
            <section class="art-description">                               
                <p class="spanCategoryName">Description:</p>
                <p><%# Eval("Description")%></p>
                <p><span class="spanCategoryName">Size: </span><%# Eval("Size")%></p>
                <p><span class="spanCategoryName">Number of: </span><%# Eval("NumberOf")%></p>                
            </section>
        </article>
    </ItemTemplate>
</asp:ListView>

<asp:ObjectDataSource ID="ODSArtsALL" 
    runat="server" 
    TypeName="CLibArtreve.bll.ArtBLL"  
    SelectMethod="GetArtById"
    onselecting="ODSArtsALL_Selecting"
    OnObjectCreating="ODSArtsALL_OnObjectCreating">
    <SelectParameters>
        <asp:QueryStringParameter Name="id" QueryStringField="Id" Type="Int64" />
    </SelectParameters>
</asp:ObjectDataSource>